import request from '@/utils/request'

export function listInfo(query) {
    return request({
        url: '/nurselevel/page',
        method: 'get',
        params: query
    })
}
export function listItem(){
    return request({
        url: '/nursecontent/list',
        method: 'get',
    })
}
export function listLevel(){
    return request({
        url: '/nurselevel/list',
        method: 'get',
    })

}
export function saveOrUpdateInfo(data) {
    return request({
        url: '/nurselevel/saveOrUpdate',
        method: 'post',
        data
    })
}
export function getById(id) {
    return request({
        url: '/nurselevel/getById/' + id,
        method: 'get',
    })
}
export function getByName(name) {
    return request({
        url: '/nurselevelitem/getByName/' + name,
        method: 'get',
    })
}
export function removeById(id) {
    return request({
        url: '/nurselevel/' + id,
        method: 'delete'
    })
}

export function getItem(query) {
    return request({
        url: '/nurselevelitem/page',
        method: 'get',
        params: query
    })
}
export function getItemByName(query){
    return request({
        url: '/nurselevelitem/getByName',
        method: 'get',
        params: query
    })
}
export function saveOrUpdateItem(data) {
    return request({
        url: '/nurselevelitem/saveOrUpdate',
        method: 'post',
        data
    })
}

export function removeItemById(levelid,itemid) {
    return request({
        url: '/nurselevelitem/'+levelid+'/'+itemid,
        method: 'delete',
    })
}